Integrand size = 21, antiderivative size = 74 \[ \int \sin ^4(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {3}{8} (a-5 b) x-\frac {(5 a-9 b) \cos (e+f x) \sin (e+f x)}{8 f}+\frac {(a-b) \cos ^3(e+f x) \sin (e+f x)}{4 f}+\frac {b \tan (e+f x)}{f} \]
3/8*(a-5*b)*x-1/8*(5*a-9*b)*cos(f*x+e)*sin(f*x+e)/f+1/4*(a-b)*cos(f*x+e)^3 *sin(f*x+e)/f+b*tan(f*x+e)/f
Time = 0.62 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.78 \[ \int \sin ^4(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {12 (a-5 b) (e+f x)-8 (a-2 b) \sin (2 (e+f x))+(a-b) \sin (4 (e+f x))+32 b \tan (e+f x)}{32 f} \]
(12*(a - 5*b)*(e + f*x) - 8*(a - 2*b)*Sin[2*(e + f*x)] + (a - b)*Sin[4*(e + f*x)] + 32*b*Tan[e + f*x])/(32*f)
Time = 0.27 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.27, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 4146, 360, 1471, 299, 216}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sin ^4(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (e+f x)^4 \left (a+b \tan (e+f x)^2\right )dx\) |
\(\Big \downarrow \) 4146 |
\(\displaystyle \frac {\int \frac {\tan ^4(e+f x) \left (b \tan ^2(e+f x)+a\right )}{\left (\tan ^2(e+f x)+1\right )^3}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 360 |
\(\displaystyle \frac {\frac {(a-b) \tan (e+f x)}{4 \left (\tan ^2(e+f x)+1\right )^2}-\frac {1}{4} \int \frac {-4 b \tan ^4(e+f x)-4 (a-b) \tan ^2(e+f x)+a-b}{\left (\tan ^2(e+f x)+1\right )^2}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 1471 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{2} \int \frac {8 b \tan ^2(e+f x)+3 a-7 b}{\tan ^2(e+f x)+1}d\tan (e+f x)-\frac {(5 a-9 b) \tan (e+f x)}{2 \left (\tan ^2(e+f x)+1\right )}\right )+\frac {(a-b) \tan (e+f x)}{4 \left (\tan ^2(e+f x)+1\right )^2}}{f}\) |
\(\Big \downarrow \) 299 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{2} \left (3 (a-5 b) \int \frac {1}{\tan ^2(e+f x)+1}d\tan (e+f x)+8 b \tan (e+f x)\right )-\frac {(5 a-9 b) \tan (e+f x)}{2 \left (\tan ^2(e+f x)+1\right )}\right )+\frac {(a-b) \tan (e+f x)}{4 \left (\tan ^2(e+f x)+1\right )^2}}{f}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{2} (3 (a-5 b) \arctan (\tan (e+f x))+8 b \tan (e+f x))-\frac {(5 a-9 b) \tan (e+f x)}{2 \left (\tan ^2(e+f x)+1\right )}\right )+\frac {(a-b) \tan (e+f x)}{4 \left (\tan ^2(e+f x)+1\right )^2}}{f}\) |
(((a - b)*Tan[e + f*x])/(4*(1 + Tan[e + f*x]^2)^2) + ((3*(a - 5*b)*ArcTan[ Tan[e + f*x]] + 8*b*Tan[e + f*x])/2 - ((5*a - 9*b)*Tan[e + f*x])/(2*(1 + T an[e + f*x]^2)))/4)/f
3.1.37.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[d*x *((a + b*x^2)^(p + 1)/(b*(2*p + 3))), x] - Simp[(a*d - b*c*(2*p + 3))/(b*(2 *p + 3)) Int[(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && NeQ[2*p + 3, 0]
Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] : > Simp[(-a)^(m/2 - 1)*(b*c - a*d)*x*((a + b*x^2)^(p + 1)/(2*b^(m/2 + 1)*(p + 1))), x] + Simp[1/(2*b^(m/2 + 1)*(p + 1)) Int[(a + b*x^2)^(p + 1)*Expan dToSum[2*b*(p + 1)*x^2*Together[(b^(m/2)*x^(m - 2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d))/(a + b*x^2)] - (-a)^(m/2 - 1)*(b*c - a*d), x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && IGtQ[m/2, 0] & & (IntegerQ[p] || EqQ[m + 2*p + 1, 0])
Int[((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> With[{Qx = PolynomialQuotient[(a + b*x^2 + c*x^4)^p, d + e*x^2 , x], R = Coeff[PolynomialRemainder[(a + b*x^2 + c*x^4)^p, d + e*x^2, x], x , 0]}, Simp[(-R)*x*((d + e*x^2)^(q + 1)/(2*d*(q + 1))), x] + Simp[1/(2*d*(q + 1)) Int[(d + e*x^2)^(q + 1)*ExpandToSum[2*d*(q + 1)*Qx + R*(2*q + 3), x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^ 2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] && LtQ[q, -1]
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_ )])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim p[c*(ff^(m + 1)/f) Subst[Int[x^m*((a + b*(ff*x)^n)^p/(c^2 + ff^2*x^2)^(m/ 2 + 1)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x ] && IntegerQ[m/2]
Time = 0.72 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.38
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {\left (\sin \left (f x +e \right )^{3}+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )+b \left (\frac {\sin \left (f x +e \right )^{7}}{\cos \left (f x +e \right )}+\left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )-\frac {15 f x}{8}-\frac {15 e}{8}\right )}{f}\) | \(102\) |
default | \(\frac {a \left (-\frac {\left (\sin \left (f x +e \right )^{3}+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )+b \left (\frac {\sin \left (f x +e \right )^{7}}{\cos \left (f x +e \right )}+\left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )-\frac {15 f x}{8}-\frac {15 e}{8}\right )}{f}\) | \(102\) |
risch | \(\frac {3 a x}{8}-\frac {15 b x}{8}+\frac {i {\mathrm e}^{2 i \left (f x +e \right )} a}{8 f}-\frac {i {\mathrm e}^{2 i \left (f x +e \right )} b}{4 f}-\frac {i {\mathrm e}^{-2 i \left (f x +e \right )} a}{8 f}+\frac {i {\mathrm e}^{-2 i \left (f x +e \right )} b}{4 f}+\frac {2 i b}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}+\frac {\sin \left (4 f x +4 e \right ) a}{32 f}-\frac {\sin \left (4 f x +4 e \right ) b}{32 f}\) | \(124\) |
1/f*(a*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)+b*(si n(f*x+e)^7/cos(f*x+e)+(sin(f*x+e)^5+5/4*sin(f*x+e)^3+15/8*sin(f*x+e))*cos( f*x+e)-15/8*f*x-15/8*e))
Time = 0.27 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.97 \[ \int \sin ^4(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {3 \, {\left (a - 5 \, b\right )} f x \cos \left (f x + e\right ) + {\left (2 \, {\left (a - b\right )} \cos \left (f x + e\right )^{4} - {\left (5 \, a - 9 \, b\right )} \cos \left (f x + e\right )^{2} + 8 \, b\right )} \sin \left (f x + e\right )}{8 \, f \cos \left (f x + e\right )} \]
1/8*(3*(a - 5*b)*f*x*cos(f*x + e) + (2*(a - b)*cos(f*x + e)^4 - (5*a - 9*b )*cos(f*x + e)^2 + 8*b)*sin(f*x + e))/(f*cos(f*x + e))
\[ \int \sin ^4(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\int \left (a + b \tan ^{2}{\left (e + f x \right )}\right ) \sin ^{4}{\left (e + f x \right )}\, dx \]
Time = 0.34 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.11 \[ \int \sin ^4(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {3 \, {\left (f x + e\right )} {\left (a - 5 \, b\right )} + 8 \, b \tan \left (f x + e\right ) - \frac {{\left (5 \, a - 9 \, b\right )} \tan \left (f x + e\right )^{3} + {\left (3 \, a - 7 \, b\right )} \tan \left (f x + e\right )}{\tan \left (f x + e\right )^{4} + 2 \, \tan \left (f x + e\right )^{2} + 1}}{8 \, f} \]
1/8*(3*(f*x + e)*(a - 5*b) + 8*b*tan(f*x + e) - ((5*a - 9*b)*tan(f*x + e)^ 3 + (3*a - 7*b)*tan(f*x + e))/(tan(f*x + e)^4 + 2*tan(f*x + e)^2 + 1))/f
Leaf count of result is larger than twice the leaf count of optimal. 4018 vs. \(2 (68) = 136\).
Time = 1.89 (sec) , antiderivative size = 4018, normalized size of antiderivative = 54.30 \[ \int \sin ^4(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\text {Too large to display} \]
1/64*(3*pi*b*sgn(2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*t an(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^5*tan(e)^5 + 24*a*f*x*t an(f*x)^5*tan(e)^5 - 120*b*f*x*tan(f*x)^5*tan(e)^5 + 3*pi*b*sgn(-2*tan(f*x )^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^5*tan(e )^5 + 6*pi*b*sgn(2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*t an(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^5*tan(e)^3 - 3*pi*b*sgn (2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^4*tan(e)^4 + 6*pi*b*sgn(2*tan(f*x)^2*ta n(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^3*tan(e)^5 + 6*b*arctan((tan(f*x) + tan(e))/(tan(f*x)*t an(e) - 1))*tan(f*x)^5*tan(e)^5 - 6*b*arctan(-(tan(f*x) - tan(e))/(tan(f*x )*tan(e) + 1))*tan(f*x)^5*tan(e)^5 + 48*a*f*x*tan(f*x)^5*tan(e)^3 - 240*b* f*x*tan(f*x)^5*tan(e)^3 + 6*pi*b*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan (e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^5*tan(e)^3 - 24*a*f*x*tan(f*x)^4*t an(e)^4 + 120*b*f*x*tan(f*x)^4*tan(e)^4 - 3*pi*b*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^4*tan(e)^4 + 48*a* f*x*tan(f*x)^3*tan(e)^5 - 240*b*f*x*tan(f*x)^3*tan(e)^5 + 6*pi*b*sgn(-2*ta n(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^3* tan(e)^5 + 3*pi*b*sgn(2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^5*tan(e) - 6*pi...
Time = 10.42 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.07 \[ \int \sin ^4(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=x\,\left (\frac {3\,a}{8}-\frac {15\,b}{8}\right )-\frac {\left (\frac {5\,a}{8}-\frac {9\,b}{8}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^3+\left (\frac {3\,a}{8}-\frac {7\,b}{8}\right )\,\mathrm {tan}\left (e+f\,x\right )}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^4+2\,{\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}+\frac {b\,\mathrm {tan}\left (e+f\,x\right )}{f} \]